package com.pro.pojo;

import java.util.Objects;

/**
 * @author cyj
 * @date 2022.1.14$ 15.29$
 * @content :
 */
public class JsOrder {
    private long orderId;//主键id
    private long userId;//外键，用户表id
    private String trueName;//后台用户名称
    private String nickname;//用户姓名
    private String phone;//手机号
    private Integer productId;
    private Integer courseId;
    private String courseName;//课程名称
    private String courseIntro;//课程简介
    private String productName;//商品名称
    private String productDescription;//商品描述，简介
    private String roleName;//商家
    private long addressId;//用户地址主键
    private long userNumber;//用户编号
    private long orderNo;//供客户查询编号
    private long shopId;//购买编号
    private long orderStatus;//订单状态，2未付款，3已付款，4待发货，5已发货，6已签收，7退货申请，8退货中
    private long productCount;//商品数量
    private double priceTotal;//商品总价
    private double logisticsFee;//订单金额
    private double freightAmount;//运费金额
    private long orderLogisticsNumber;//订单物流编号
    private long orderType;//商品类型，2视频，3商品
    private long orderPaymentChannel;//订单支付渠道，2微信支付，3支付宝支付
    private long paymentOrderNo;//订单支付单号，第三方支付流水号
    private String receivingAddress;//收货地址，外键收获地址表id
    private Integer orderSource;//订单来源
    private Integer comment;//评论状态

    public JsOrder() {
        super();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        JsOrder jsOrder = (JsOrder) o;
        return orderId == jsOrder.orderId &&
                userId == jsOrder.userId &&
                addressId == jsOrder.addressId &&
                userNumber == jsOrder.userNumber &&
                orderNo == jsOrder.orderNo &&
                shopId == jsOrder.shopId &&
                orderStatus == jsOrder.orderStatus &&
                productCount == jsOrder.productCount &&
                Double.compare(jsOrder.priceTotal, priceTotal) == 0 &&
                Double.compare(jsOrder.logisticsFee, logisticsFee) == 0 &&
                Double.compare(jsOrder.freightAmount, freightAmount) == 0 &&
                orderLogisticsNumber == jsOrder.orderLogisticsNumber &&
                orderType == jsOrder.orderType &&
                orderPaymentChannel == jsOrder.orderPaymentChannel &&
                paymentOrderNo == jsOrder.paymentOrderNo &&
                Objects.equals(trueName, jsOrder.trueName) &&
                Objects.equals(nickname, jsOrder.nickname) &&
                Objects.equals(phone, jsOrder.phone) &&
                Objects.equals(productId, jsOrder.productId) &&
                Objects.equals(courseId, jsOrder.courseId) &&
                Objects.equals(courseName, jsOrder.courseName) &&
                Objects.equals(courseIntro, jsOrder.courseIntro) &&
                Objects.equals(productName, jsOrder.productName) &&
                Objects.equals(productDescription, jsOrder.productDescription) &&
                Objects.equals(roleName, jsOrder.roleName) &&
                Objects.equals(receivingAddress, jsOrder.receivingAddress) &&
                Objects.equals(orderSource, jsOrder.orderSource) &&
                Objects.equals(comment, jsOrder.comment);
    }

    @Override
    public int hashCode() {
        return Objects.hash(orderId, userId, trueName, nickname, phone, productId, courseId, courseName, courseIntro, productName, productDescription, roleName, addressId, userNumber, orderNo, shopId, orderStatus, productCount, priceTotal, logisticsFee, freightAmount, orderLogisticsNumber, orderType, orderPaymentChannel, paymentOrderNo, receivingAddress, orderSource, comment);
    }

    @Override
    public String toString() {
        return "JsOrder{" +
                "orderId=" + orderId +
                ", userId=" + userId +
                ", trueName='" + trueName + '\'' +
                ", nickname='" + nickname + '\'' +
                ", phone='" + phone + '\'' +
                ", productId=" + productId +
                ", courseId=" + courseId +
                ", courseName='" + courseName + '\'' +
                ", courseIntro='" + courseIntro + '\'' +
                ", productName='" + productName + '\'' +
                ", productDescription='" + productDescription + '\'' +
                ", roleName='" + roleName + '\'' +
                ", addressId=" + addressId +
                ", userNumber=" + userNumber +
                ", orderNo=" + orderNo +
                ", shopId=" + shopId +
                ", orderStatus=" + orderStatus +
                ", productCount=" + productCount +
                ", priceTotal=" + priceTotal +
                ", logisticsFee=" + logisticsFee +
                ", freightAmount=" + freightAmount +
                ", orderLogisticsNumber=" + orderLogisticsNumber +
                ", orderType=" + orderType +
                ", orderPaymentChannel=" + orderPaymentChannel +
                ", paymentOrderNo=" + paymentOrderNo +
                ", receivingAddress='" + receivingAddress + '\'' +
                ", orderSource=" + orderSource +
                ", comment=" + comment +
                '}';
    }

    public long getOrderId() {
        return orderId;
    }

    public void setOrderId(long orderId) {
        this.orderId = orderId;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public String getTrueName() {
        return trueName;
    }

    public void setTrueName(String trueName) {
        this.trueName = trueName;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    public Integer getCourseId() {
        return courseId;
    }

    public void setCourseId(Integer courseId) {
        this.courseId = courseId;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public String getCourseIntro() {
        return courseIntro;
    }

    public void setCourseIntro(String courseIntro) {
        this.courseIntro = courseIntro;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductDescription() {
        return productDescription;
    }

    public void setProductDescription(String productDescription) {
        this.productDescription = productDescription;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public long getAddressId() {
        return addressId;
    }

    public void setAddressId(long addressId) {
        this.addressId = addressId;
    }

    public long getUserNumber() {
        return userNumber;
    }

    public void setUserNumber(long userNumber) {
        this.userNumber = userNumber;
    }

    public long getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(long orderNo) {
        this.orderNo = orderNo;
    }

    public long getShopId() {
        return shopId;
    }

    public void setShopId(long shopId) {
        this.shopId = shopId;
    }

    public long getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(long orderStatus) {
        this.orderStatus = orderStatus;
    }

    public long getProductCount() {
        return productCount;
    }

    public void setProductCount(long productCount) {
        this.productCount = productCount;
    }

    public double getPriceTotal() {
        return priceTotal;
    }

    public void setPriceTotal(double priceTotal) {
        this.priceTotal = priceTotal;
    }

    public double getLogisticsFee() {
        return logisticsFee;
    }

    public void setLogisticsFee(double logisticsFee) {
        this.logisticsFee = logisticsFee;
    }

    public double getFreightAmount() {
        return freightAmount;
    }

    public void setFreightAmount(double freightAmount) {
        this.freightAmount = freightAmount;
    }

    public long getOrderLogisticsNumber() {
        return orderLogisticsNumber;
    }

    public void setOrderLogisticsNumber(long orderLogisticsNumber) {
        this.orderLogisticsNumber = orderLogisticsNumber;
    }

    public long getOrderType() {
        return orderType;
    }

    public void setOrderType(long orderType) {
        this.orderType = orderType;
    }

    public long getOrderPaymentChannel() {
        return orderPaymentChannel;
    }

    public void setOrderPaymentChannel(long orderPaymentChannel) {
        this.orderPaymentChannel = orderPaymentChannel;
    }

    public long getPaymentOrderNo() {
        return paymentOrderNo;
    }

    public void setPaymentOrderNo(long paymentOrderNo) {
        this.paymentOrderNo = paymentOrderNo;
    }

    public String getReceivingAddress() {
        return receivingAddress;
    }

    public void setReceivingAddress(String receivingAddress) {
        this.receivingAddress = receivingAddress;
    }

    public Integer getOrderSource() {
        return orderSource;
    }

    public void setOrderSource(Integer orderSource) {
        this.orderSource = orderSource;
    }

    public Integer getComment() {
        return comment;
    }

    public void setComment(Integer comment) {
        this.comment = comment;
    }
}
